// index.js
 // 指纹支付
 const AUTH_MODE='fingerPrint'
Page({
    data: {
        // 弹出层
        show: false,
        show1:false,
        show2:false,
        show3:false,
        // 标签页
        active: 0,
        // 折叠面板
        activeNames: ['1'],
    //   轮播图
      swiperimages:[
        "https://7869-xichaaa-0gnh8d4f2a750362-1326668818.tcb.qcloud.la/image/lunbo1.jpg?sign=d8e8c2b1515d181e16cb192069739394&t=1716473368",
        "https://7869-xichaaa-0gnh8d4f2a750362-1326668818.tcb.qcloud.la/image/lunbo2.jpg?sign=25422df0c4d102f38d3daa57f8fbf1da&t=1716473385",
    ]

        
    },    
    // 指纹支付
    startAuth(){
        wx.checkIsSupportSoterAuthentication({
            success:(res)=>{
                console.log(res)
                checkIsEnrolled()
            },
            fail:(err)=>{
                console.error(err)
                wx.showModal({
                  title: '错误',
                  content: '您的设备不支持指纹识别',
                  showCancel:false
                })
            }
        })
        const checkIsEnrolled=()=>{
            wx.checkIsSoterEnrolledInDevice({checkAuthMode:AUTH_MODE,
                success:(res)=>{
                console.log(res)
                if (parseInt(res.isEnrolled)<=0){
                    wx.showModal({
                      title: '错误',
                      content: '你暂未录入指纹信息',
                      showCancel:false
                    })
                    return
                }
            },
            fail:(err)=>{
                console.error(err)
            }
        })
        }
    },
    //动作面板
    onCloseTwo() {
      this.setData({ show: false });
    },
    onSelectTwo(event) {
      console.log(event.detail);
    },
    // 弹出层
    showPopup() {
      this.setData({ show: true });
    },
    showPopup1() {
        this.setData({ show1: true });
      },
      showPopup2() {
        this.setData({ show2: true });
      },
      showPopup3() {
        this.setData({ show3: true });
      },
    onClose() {
      this.setData({ show: false });
    },
    onClose1() {
        this.setData({ show1: false });
      },
      onClose2() {
        this.setData({ show2: false });
      },
      onClose3() {
        this.setData({ show3: false });
      },
      onDrag(event) {
        this.setData({
          currentValue: event.detail.value,
        });
      },
    //   折叠面板
    onChange(event) {
        this.setData({
          activeNames: event.detail,
        });
      },
  });
  